Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early start to supporting sourcemaps. #224

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

kevinswiber
Copy link
Member

A work in progress towards #220.

Signed-off-by: Kevin Swiber [email protected]

@kevinswiber
Copy link
Member Author

Unfortunately, IDs set to requests on items don't seem to actually propagate via the Postman API, so it seems to be the only artifact left that comes back as "modified". Any thoughts here?

image

Signed-off-by: Kevin Swiber <[email protected]>
@abhijitkane
Copy link
Member

@kevinswiber Could you expand your last comment? My understanding is:

  1. A source map is a map from an OpenAPI operation to a Postman request ID
  2. Source maps are generated during conversion from OAS to collection
  3. Source maps are accepted as optional input during conversion - these will be used to add the same request IDs in the generated collection.

Is the blocker that even keeping the IDs the same will cause the collection feed to show a diff for all requests?

@kevinswiber
Copy link
Member Author

kevinswiber commented Aug 20, 2020

@abhijitkane When updating a collection via the Postman API, if IDs for folders and responses are set, they persist. This means we can get more granular updates for these in Postman Version Control. However, for requests, the IDs do not persist on a collection update. The request IDs are all regenerated, despite being set, and Postman Version Control marks them all as new while all previous ones are removed. This makes it really difficult to review modifications between transpile events.

@@ -711,13 +715,17 @@ module.exports = {
// Add all folders created from tags and corresponding operations
// Iterate from bottom to top order to maintain tag order in spec
_.forEachRight(tagFolders, (tagFolder, tagName) => {
const sourceMapKey = `#/folders/${encodeURIComponent(resource.name)}`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be tagName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants